function logger(req,res,next){
    console.log("%s %s",req.method,req.url);
    next();
}

function hello(req,res){
    res.setHeader("content-type","text/plain");
    res.end("Hello World!");
}

var connect = require("connect");
var app = connect();
app.use(logger)
    .use(hello)
    .listen(8899);